home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
gnu
/
gas_251.zip
/
bin_251
/
binutils
/
testsuite
/
binutils-all
/
size.exp
< prev
Wrap
Text File
|
1994-09-29
|
3KB
|
57 lines
# Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@prep.ai.mit.edu
# This file was written by Rob Savoye. (rob@cygnus.com)
load_lib util-defs.exp
load_lib utils-lib.exp
# print the version number of size
send_user "Version [binutil_version $SIZE]"
set test_code $objdir/$subdir/bintest
set addr "\[0-9A-Fa-f\]+"
#
# setup the list. Here the layout:
# 1st field is the command line option.
# 2nd field is the pattern to match. NOTE - No variable substitutions can be used!
# 3rd field is an optional message to print with PASS/FAIL.
#
set utility [list { "" "text.*data.*bss.*dec.*hex.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*[file tail $test_code].*" "No arguments" } \
{ "--format bsd" "text.*data.*bss.*dec.*hex.*filename.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*[file tail $test_code].*" "Berkeley Output (long name)" } \
{ "-B" "text.*data.*bss.*dec.*hex.*filename.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*[file tail $test_code].*" "Berkeley Output (short name)" } \
{ "--format sysv" ".*:.*section.*size.*\[0-9A-Fa-f\]+.*(\\.text|\\$TEXT\\$).*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*(\\.data|\\$DATA\\$).*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*(\\.bss|\\$BSS\\$).*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*Total.*\[0-9A-Fa-f\]+" "System V output (long name)" } \
{ "-A" ".*:.*section.*size.*\[0-9A-Fa-f\]+.*(\\.text|\\$TEXT\\$).*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*(\\.data|\\$DATA\\$).*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*(\\.bss|\\$BSS\\$).*\[0-9A-Fa-f\]+.*\[0-9A-Fa-f\]+.*Total.*\[0-9A-Fa-f\]+" "System V output (short name)" } ]
foreach i $utility {
if [util_test "$SIZE" "$SIZEFLAGS [lindex $i 0]" $test_code [lindex $i 1] [lindex $i 2]] then {
fail "[lindex $i 2]"
} else {
pass "[lindex $i 2]"
}
}
#
# FIXME: lots more options to test...
#